

<tr id="exchange_<?php echo $echange->getId() ?>">
  <td><?php echo link_to($echange->getId(), "@lets_exchangeByManager_show?id=" . $echange->getId()) ?></td>
  <td><?php echo format_date($echange->getDateExchange()) ?></td>
  <td><?php echo lets_format_member($echange->getCreditorUser(),true,false) ?></td>
  <td><?php echo lets_format_member($echange->getDebitorUser(),true,false) ?></td>
  
  <td><?php echo $echange->getName() ?></td>
  <td><?php echo $echange->getAmount() ?></td>
  <td><?php echo $echange->getStateValidationString() ?></td>
  <td><?php 
  if($echange->isAccepted() && $echange->canEdit($sf_user))
  {
    echo link_to('[Annuler]',  '@lets_exchange_validate_one?state='.LetsExchangeTable::STATE_REFUSED.'&id=' . $echange->getId(),
      array('confirm'=>'Etes vous sur d\'annuler cet échange ?')) ;
  }
  else if($echange->canEdit($sf_user)){
    echo link_to('[Editer]',  '@lets_exchangeByManager_edit?id=' . $echange->getId());
    echo link_to('[Valider]',  '@lets_exchange_validate_one?state='.LetsExchangeTable::STATE_ACCEPTED.'&id=' . $echange->getId()) ;
    echo link_to('[Refuser]',  '@lets_exchange_validate_one?state='.LetsExchangeTable::STATE_REFUSED.'&id=' . $echange->getId()) ;
  }
  ?></td>
</tr>
